/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface UserOrderScopeDept extends BasicModel<UserOrderScopeDept> {
  userCode?: string; // 用户编码
  officeCode?: string; // 部门编码
}

export const userOrderScopeDeptList = (params?: UserOrderScopeDept | any) =>
  defHttp.get<UserOrderScopeDept>({ url: adminPath + '/srm/scope/userOrderScopeDept/list', params });

export const userOrderScopeDeptListData = (params?: UserOrderScopeDept | any) =>
  defHttp.post<Page<UserOrderScopeDept>>({ url: adminPath + '/srm/scope/userOrderScopeDept/listData', params });

export const userOrderScopeDeptForm = (params?: UserOrderScopeDept | any) =>
  defHttp.get<UserOrderScopeDept>({ url: adminPath + '/srm/scope/userOrderScopeDept/form', params });

export const userOrderScopeDeptSave = (params?: any, data?: UserOrderScopeDept | any) =>
  defHttp.postJson<UserOrderScopeDept>({ url: adminPath + '/srm/scope/userOrderScopeDept/save', params, data });

export const userOrderScopeDeptDelete = (params?: UserOrderScopeDept | any) =>
  defHttp.get<UserOrderScopeDept>({ url: adminPath + '/srm/scope/userOrderScopeDept/delete', params });
